﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StoreTransport.Business.Constants;

namespace StoreTransport.Data {
    public class MarketData {
        public int MarketId { get; set; }
        public string MarketName { get; set; }
        public string RegionName { get; set; }
        public string AreaName { get; set; }
        public int RegionId { get; set; }
        public int AreaId { get; set; }
        public string MarketKindName { get; set; }
        // use in compute
        public Dictionary<int, ProductKindData> DicProductKinds { get; set; }
        private void initDictionary() {
            DicProductKinds = new Dictionary<int, ProductKindData>();
        }

        public MarketData() {
            initDictionary();
        }

        public static Status StatusValueOf(string statusValue) {
            if (Status.A.ToString().Equals(statusValue)) {
                return Status.A;
            }
            return Status.I;
        }
    }
}
